/** 
 * @Title : TestType.java 
 * @Package cn.edu.cdtu.healthserver.domain 
 * @Description : 数据库test_type表对象
 * @author  
 * @date 
 * @version V0.0   
 */
package cn.edu.cdtu.healthserver.domain;

/** 
 * @ClassName : TestType 
 * @Description : TODO
 * @author 
 * @date 
 */
public class TestType {
	private int id;
	private String type;
	private String description;
	private int available = 1;
	
	/** 
	 * @Title: TestType
	 * @Description: TODO
	 * @throws 
	 *
	 */
	public TestType() {
		
	}

	/** 
	 * @Title: TestType
	 * @Description: TODO
	 * @throws 
	 *
	 * @param type
	 * @param description
	 */
	public TestType(String type, String description) {
		this.type = type;
		this.description = description;
	}

	/** 
	 * @Title: TestType
	 * @Description: TODO
	 * @throws 
	 *
	 * @param id
	 * @param type
	 * @param description
	 */
	public TestType(int id, String type, String description) {
		this.id = id;
		this.type = type;
		this.description = description;
	}

	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * @return the type
	 */
	public String getType() {
		return type;
	}

	/**
	 * @param type the type to set
	 */
	public void setType(String type) {
		this.type = type;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @return the available
	 */
	public int getAvailable() {
		return available;
	}

	/**
	 * @param available the available to set
	 */
	public void setAvailable(int available) {
		this.available = available;
	}

	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/* (non-Javadoc)
	 * <p>Title: hashCode</p> 
	 * <p>Description: </p> 
	 * @return 
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + available;
		result = prime * result
				+ ((description == null) ? 0 : description.hashCode());
		result = prime * result + id;
		result = prime * result + ((type == null) ? 0 : type.hashCode());
		return result;
	}

	/* (non-Javadoc)
	 * <p>Title: equals</p> 
	 * <p>Description: </p> 
	 * @param obj
	 * @return 
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		TestType other = (TestType) obj;
		if (available != other.available)
			return false;
		if (description == null) {
			if (other.description != null)
				return false;
		} else if (!description.equals(other.description))
			return false;
		if (id != other.id)
			return false;
		if (type == null) {
			if (other.type != null)
				return false;
		} else if (!type.equals(other.type))
			return false;
		return true;
	}

	/* (non-Javadoc)
	 * <p>Title: toString</p> 
	 * <p>Description: </p> 
	 * @return 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "TestType [id=" + id + ", type=" + type + ", description="
				+ description + ", available=" + available + "]";
	}
	
}
